#ifndef __HAL_X86_H__
#define __HAL_X86_H__
#ifdef __cplusplus
extern "C"{
#endif
#include <cstdint.h>
int _outp(unsigned short, int);
unsigned short _outpw(unsigned short, unsigned short);
int _inp(unsigned short);
unsigned short _inpw(unsigned short);
void *_ReturnAddress();
typedef struct registers
{
   uint32_t ds;                  // Data segment selector
   uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; // Pushed by pusha.
   uint32_t int_no, err_code;    // Interrupt number and error code (if applicable)
   uint32_t eip, cs, eflags, useresp, ss; // Pushed by the processor automatically.
} registers_t; 
#define getRetAddr		_ReturnAddress
#pragma intrinsic(_ReturnAddress, _outp, _inp, _outpw, _inpw)
#ifdef __cplusplus
}
#endif
#endif